﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Admx_Generator;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Tests_Admx_Generator
{
    public class Test_Utilities
    {
        [TestClass]
        public class IsValideFilename_Should
        {
            [TestMethod()]
            public void ReturnTrue_WhenCallWithValideFilename()
            {
                Assert.IsTrue(Utilities.IsValidFilename("filename.admx"));
                Assert.IsTrue(Utilities.IsValidFilename("file_name.admx"));
                Assert.IsTrue(Utilities.IsValidFilename("file-name.admx"));
                Assert.IsTrue(Utilities.IsValidFilename("1filename.admx"));
                Assert.IsTrue(Utilities.IsValidFilename("filename1.admx"));
            }

            [TestMethod]
            public void ReturnFalse_WhenCallWithInvalideFilename()
            {
                Assert.IsFalse(Utilities.IsValidFilename("file>name.admx"));
                Assert.IsFalse(Utilities.IsValidFilename("file<name.admx"));
                Assert.IsFalse(Utilities.IsValidFilename("file/name.admx"));
                Assert.IsFalse(Utilities.IsValidFilename("file?name.admx"));
                Assert.IsFalse(Utilities.IsValidFilename("file*name.admx"));
                Assert.IsFalse(Utilities.IsValidFilename("file:name.admx"));
            }

        }

    }
}
